package com.weixinli.beans;

import java.io.Serializable;

public class FmArticle implements Serializable{
	private int fid;//音频编号
	private String fname;//音频名字
	private String faddr;//音频地址
	private String fcontent;//音频文章内容
	private String ftype;//心情类型
	private String ftime;//收录时间
	private String fauthor;//作者
	private int fnumber;//播放次数 fnumber
	private int fdownload;//下载次数
	private String fAudio;//音频地址
	private static final long serialVersionUID = 1L;
	
	@Override
	public String toString() {
		return "FmArticle [fid=" + fid + ", fname=" + fname + ", faddr="
				+ faddr + ", fcontent=" + fcontent + ", ftype=" + ftype
				+ ", ftime=" + ftime + ", fauthor=" + fauthor + ", fnumber="
				+ fnumber + ", fdownload=" + fdownload + ", fAudio=" + fAudio
				+ "]";
	}

	public int getFid() {
		return fid;
	}
	
	public int getFids() {
		return fid;
	}

	public void setFid(int fid) {
		this.fid = fid;
	}

	public String getFname() {
		return fname;
	}

	public void setFname(String fname) {
		this.fname = fname;
	}

	public String getFaddr() {
		return faddr;
	}

	public void setFaddr(String faddr) {
		this.faddr = faddr;
	}

	public String getFcontent() {
		return fcontent;
	}

	public void setFcontent(String fcontent) {
		this.fcontent = fcontent;
	}

	public String getFtype() {
		return ftype;
	}

	public void setFtype(String ftype) {
		this.ftype = ftype;
	}

	public String getFtime() {
		if(ftime!=null && !"".equals(ftime) && ftime.indexOf(" ")>0){
			return ftime.substring(0,ftime.indexOf(" "));
		}else{
			return ftime;
		}
	}

	public void setFtime(String ftime) {
		this.ftime = ftime;
	}

	public String getFauthor() {
		return fauthor;
	}

	public void setFauthor(String fauthor) {
		this.fauthor = fauthor;
	}

	public int getFnumber() {
		return fnumber;
	}

	public void setFnumber(int fnumber) {
		this.fnumber = fnumber;
	}

	public int getFdownload() {
		return fdownload;
	}

	public void setFdownload(int fdownload) {
		this.fdownload = fdownload;
	}

	public String getfAudio() {
		return fAudio;
	}

	public void setfAudio(String fAudio) {
		this.fAudio = fAudio;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((fAudio == null) ? 0 : fAudio.hashCode());
		result = prime * result + ((faddr == null) ? 0 : faddr.hashCode());
		result = prime * result + ((fauthor == null) ? 0 : fauthor.hashCode());
		result = prime * result
				+ ((fcontent == null) ? 0 : fcontent.hashCode());
		result = prime * result + fdownload;
		result = prime * result + fid;
		result = prime * result + ((fname == null) ? 0 : fname.hashCode());
		result = prime * result + fnumber;
		result = prime * result + ((ftime == null) ? 0 : ftime.hashCode());
		result = prime * result + ((ftype == null) ? 0 : ftype.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FmArticle other = (FmArticle) obj;
		if (fAudio == null) {
			if (other.fAudio != null)
				return false;
		} else if (!fAudio.equals(other.fAudio))
			return false;
		if (faddr == null) {
			if (other.faddr != null)
				return false;
		} else if (!faddr.equals(other.faddr))
			return false;
		if (fauthor == null) {
			if (other.fauthor != null)
				return false;
		} else if (!fauthor.equals(other.fauthor))
			return false;
		if (fcontent == null) {
			if (other.fcontent != null)
				return false;
		} else if (!fcontent.equals(other.fcontent))
			return false;
		if (fdownload != other.fdownload)
			return false;
		if (fid != other.fid)
			return false;
		if (fname == null) {
			if (other.fname != null)
				return false;
		} else if (!fname.equals(other.fname))
			return false;
		if (fnumber != other.fnumber)
			return false;
		if (ftime == null) {
			if (other.ftime != null)
				return false;
		} else if (!ftime.equals(other.ftime))
			return false;
		if (ftype == null) {
			if (other.ftype != null)
				return false;
		} else if (!ftype.equals(other.ftype))
			return false;
		return true;
	}

	public FmArticle(int fid, String fname, String faddr, String fcontent,
			String ftype, String ftime, String fauthor, int fnumber,
			int fdownload, String fAudio) {
		super();
		this.fid = fid;
		this.fname = fname;
		this.faddr = faddr;
		this.fcontent = fcontent;
		this.ftype = ftype;
		this.ftime = ftime;
		this.fauthor = fauthor;
		this.fnumber = fnumber;
		this.fdownload = fdownload;
		this.fAudio = fAudio;
	}

	public FmArticle() {
		super();
	}

	public FmArticle(String ftype) {
		super();
		this.ftype = ftype;
	}
	
	
}
